/*******************************************************************************
 * Copyright (c) 2006 CEA List.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     CEA List - initial API and implementation
 *******************************************************************************/
package com.cea.papyrus.core.preference;

import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
import org.eclipse.jface.preference.IPreferenceStore;

import com.cea.papyrus.core.PapyrusPlugin;
import com.cea.papyrus.core.utils.Debug;

/**
 * Initializes default preference values in the preference store.
 */
public class CommonPreferenceInitializer extends AbstractPreferenceInitializer {

    /**
     * The channel.
     */
    private final int channel = 205;

    /**
     * Initialize default value in the PreferenceStore.
     */
    public void initializeDefaultPreferences() {
        Debug.debug(this, "initializeCommonPreferences()", channel);
        // Get the preference store
        IPreferenceStore store = PapyrusPlugin.getDefault().getPreferenceStore();

        // load Profile Preference constants (expand or not stereotype in properties
        // profile tab)
        // warning: not the same preference store...
        CommonPreferenceConstants.setDefaultPreferences(store);
        ClassDiagramCommonPreferenceConstants.setDefaultPreferences(store);

    }
}